#ifndef ENCRYPT_H_
#define ENCRYPT_H_

/*
* performance:  encrypt and descrypt 160 bytes:
*
*	encrypt 10000 loops cost 0.187986 second 
*	descrypt 10000 loops cost 0.181841 second 	
*	test machine: Intel(R) Xeon(R) CPU 2.4G * 1, 1G memory, linux 2.6.18 CentOS release 5.6
*/

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>
#include <sys/types.h>

/* tea encrypt */
int32_t base_encrypt(const char* src, size_t src_len, int32_t key, char* dst, size_t* dst_len);

/* tea descrypt */
int32_t base_descrypt(const char* src, size_t src_len, int32_t key, char* dst, size_t* dst_len);

#ifdef __cplusplus
}
#endif

#endif // ENCRYPT_H_



